From: Thien-Thi Nguyen Date: Thu, 23 Aug 2007 18:41:01 +0000 (+0000) Subject: (locate-get-file-positions): Use X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~17006 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d0f95c23fe8bf0f6e42d5bfa7e530b303fb6d2a9;p=emacs.git (locate-get-file-positions): Use `line-beginning-position' and `line-end-position'. --- diff --git a/lisp/locate.el b/lisp/locate.el index 95060d36197..bc2dce954da 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -406,14 +406,10 @@ there is no file name on the current line, the return value is meaningless. You can check whether the current line contains a file listed by the locate program, using the function `locate-main-listing-line-p'." - (save-excursion - (end-of-line) - (let ((eol (point))) - (beginning-of-line) - - ;; Assumes names end at the end of the line - (forward-char locate-filename-indentation) - (list (point) eol)))) + (list (+ locate-filename-indentation + (line-beginning-position)) + ;; Assume names end at the end of the line. + (line-end-position))) ;; From SQL-mode (defun locate-current-line-number ()